<!DOCTYPE html>
<html>
  <head>
    <title>添加通知</title>
    <meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"/>

<meta name="description" content="Write an awesome description for your new site here. You can edit this line in _config.yml. It will appear in your document head meta (for Google search results) and in your feed.xml site description.
"/>

<link rel="stylesheet" th:href="@{/dist/lib/weui.min.css}" />
<link rel="stylesheet" th:href="@{/dist/css/jquery-weui.min.css}" />
<link rel="stylesheet" th:href="@{/dist/demos/css/demos.css}" />
<script type="text/javascript" th:src="@{/dist/lib/jquery-2.1.4.js}" ></script>
<script type="text/javascript" th:src="@{/dist/js/jquery-weui.js}" ></script>
<script type="text/javascript" th:src="@{/dist/lib/fastclick.js}" ></script>
<link rel="stylesheet" th:href="@{/adminltecss/userl.css}" />
<link href="//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
   <style>
   	.cusmar{
  		margin-left: 40px;
  	}
  	.header-wai{
  		position: fixed;top:0px; height:60px;background-color: #363436;
  	}
   </style>
	<script type="text/javascript" th:inline="javascript">
	
	/*<![CDATA[*/
		
			function insertDemo(){
			var eid=/*[[${session.EmployeeInfo.eid}]]*/
			
			var mtitle=$("input[name='mtitle']").val();
			var mcontent=$("#textarea").val();
			if(mtitle.trim()==""){
				$.alert("通知标题不能为空");
				return false;
			}
			if(mcontent.trim()==""){
				$.alert("通知内容不能为空");
				return false;
			}
			 $.post(
				"/WBizController/insertMessageInfo",
				{
					"mtitle":mtitle,
					"mcontent":mcontent,
					"eid":eid
				},
				function(result){
					if(result.simpleResult.code=="0"){
						$.alert("通知发布成功");
						window.location.href=[[@{/WBizController/selectAllMessage}]];
					}else{
						$.alert("通知发布失败！")				
						
							
					}
				},
				"json"
			
				);	
			
				
			}
	
			/*返回上一级  */
			function returnDemo(){
				window.history.back(-1); 
			}
			
	
	
	
	
			/*]]>*/
	</script>
  </head>
  <body ontouchstart>
  	<div class="weui-tabbar header-wai" style="">
  		<a href="" class="weui-tabbar__item"  id="cusdow">
          <div class="weui-tabbar__icon"></div>
          <p class="weui-tabbar__label" style="font-size: 20px; color: white; line-height: 1px;">
          	<span class="fa fa-angle-left fa-2x" style="color: white; float: left;line-height: 10px;" onclick="returnDemo()"></span>
          	发布通知<span class="fa fa-angle-down fa-2x" style="color: white;float: right; margin-right: 10px;line-height: 10px; " id="down"></span></p>
        </a>
      </div>
  	<div class="weui-grids">
  		<div class="weui-cells__title"style="margin-top: 80px;">请输入标题</div>
  		<div class="weui-cells" style="border-bottom:gainsboro 1px solid ;border-top:gainsboro 1px solid ;">
      <div class="weui-cell">
        <div class="weui-cell__bd">
          <input class="weui-input" type="text" name="mtitle" placeholder="" required="required">
        </div>
      </div>
    </div>
    <div class="weui-cells__title">请输入通知内容</div>
  	<div class="weui-cells weui-cells_form" style="border-bottom:gainsboro 1px solid ;">
      <div class="weui-cell">
        <div class="weui-cell__bd">
          <textarea class="weui-textarea" placeholder="" rows="3" id="textarea"></textarea>
          <div class="weui-textarea-counter"><span>0</span>/200</div>
        </div>
      </div>
    </div>
    
    <ul class="weui-media-box__info" style="float: right;">
              <li class="weui-media-box__info__meta">文字来源</li>
              <li class="weui-media-box__info__meta">时间</li>
              <li class="weui-media-box__info__meta weui-media-box__info__meta_extra">其它信息</li>
            </ul>
  	
  	
  	</div>
  	<div class='demos-content-padded'>
      <a href="javascript:insertDemo();" class="weui-btn weui-btn_primary" style="margin-top: 60px;">点击发布通知</a>
      </div>
       
       <br/>
      <br/>
  	<div class="weui-tabbar" style="position: fixed;">
        <a th:href="@{/WHeadInfoController/intoMainPage}" class="weui-tabbar__item weui-bar__item--on">
         <!--  <span class="weui-badge" style="position: absolute;top: -.4em;right: 1em;">8</span> -->
          <div class="weui-tabbar__icon">
            
            <img th:src="@{/demos/images/icon_nav_button.png}" />
          </div>
          <p class="weui-tabbar__label">首页</p>
        </a>
        
        
        
        
        <!--判断是否登陆  -->
        <a href="javascript:void(0)" class="weui-tabbar__item" th:if="${session.EmployeeInfo!=null}"> 
          <div class="weui-tabbar__icon">
            <img th:src="@{/demos/images/icon_nav_msg.png}" alt=""/>
          </div>
          <p class="weui-tabbar__label">菜单</p>
        </a>
        
        <a th:href="@{/WBizController/loginDemo}" class="weui-tabbar__item" th:if="${session.EmployeeInfo==null}"> 
          <div class="weui-tabbar__icon">
            <img th:src="@{/demos/images/icon_nav_msg.png}" alt=""/>
          </div>
          <p class="weui-tabbar__label">菜单</p>
        </a>

		<!--判断是否登陆  -->
        <a th:href="@{/selectAllCustomers}" class="weui-tabbar__item" th:if="${session.EmployeeInfo!=null}">

          <div class="weui-tabbar__icon">
            <img th:src="@{/demos/images/icon_nav_article.png}" alt=""/>
          </div>
          <p class="weui-tabbar__label">客户</p>
        </a>
         <a th:href="@{/WBizController/loginDemo}" class="weui-tabbar__item" th:if="${session.EmployeeInfo==null}">

          <div class="weui-tabbar__icon">
            <img th:src="@{/demos/images/icon_nav_article.png}" alt=""/>
          </div>
          <p class="weui-tabbar__label">客户</p>
        </a>
        
        
        
        
        
        
        
        <a th:href="@{/WBizController/HeadPage}" class="weui-tabbar__item">
          <div class="weui-tabbar__icon">
            <img th:src="@{/demos/images/icon_nav_cell.png}" alt=""/>
          </div>
          <p class="weui-tabbar__label">我的</p>
        </a>
      </div>
  	</body>
  </html>
